package com.heima.comment.client;

import com.heima.comment.dto.ApUser;
import com.heima.common.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 远程user微服务接口
 *
 * @Name : UserFeignClient
 * @Author : WuQiang
 * @Date : 2022-10-16 21:10
 * @Description : 远程user微服务接口
 */
@FeignClient("leadnews-user")
public interface UserFeignClient {

    /**
     * 通过id查询用户
     *
     * @param id id
     * @return {@code ResponseResult}
     */
    @GetMapping("/api/v1/user/{id}")
    ResponseResult<ApUser> getById(@PathVariable Integer id);
}
